package com.chenjie.crud.eo;

import com.baomidou.mybatisplus.annotation.*;
import com.chenjie.crud.enums.DeleteFlagEnum;
import lombok.Data;
import lombok.experimental.Accessors;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
import org.apache.ibatis.type.JdbcType;
import org.joda.time.DateTime;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName dept
 */
@TableName(value = "dept", autoResultMap = true)
@Data
@Accessors(chain = true)
public class Dept implements Serializable {
    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 部门名称
     */
    @TableField(value = "dept_name")
    private String deptName;

    /**
     * 父类id
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 负责人
     */
    @TableField(value = "charge_person")
    private String chargePerson;

    /**
     * 手机号
     */
    @TableField(value = "telephone")
    private Long telephone;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 是否删除
     */
    @TableField(value = "delete_flag")
    @TableLogic(value = "1", delval = "2")
    private Boolean deleteFlag;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", jdbcType = JdbcType.TIMESTAMP, javaType = true, typeHandler = com.chenjie.crud.handler.DateTimeTypeHandler.class)
    private DateTime createTime;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}